Skip to content

chore: add 24-hour package manager cooldown#1694

Open
gugu wants to merge 1 commit intomainfrom
feature/add-pm-cooldown
Open

chore: add 24-hour package manager cooldown#1694
gugu wants to merge 1 commit intomainfrom
feature/add-pm-cooldown

Conversation

@gugu
Copy link
Copy Markdown
Contributor

@gugu gugu commented Mar 31, 2026

Add npmMinimalAgeGate of 1440 minutes (24 hours) to .yarnrc.yml to avoid installing freshly published packages immediately.

Summary by CodeRabbit

  • Chores
    • Updated package installation configuration settings.

Add npmMinimalAgeGate of 1440 minutes (24 hours) to .yarnrc.yml
to avoid installing freshly published packages immediately.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 31, 2026 11:53
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 31, 2026

📝 Walkthrough

Walkthrough

Added a Yarn configuration setting npmMinimalAgeGate: 1440 to .yarnrc.yml. This enforces a minimal age gate for npm packages, likely ensuring only packages of a certain age are installed during dependency resolution.

Changes

Cohort / File(s) Summary
Yarn Configuration
.yarnrc.yml
Added npmMinimalAgeGate: 1440 configuration parameter to enforce package age requirements.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A single line so clean and neat,
npmMinimalAgeGate, a security treat!
Yarn bounces along with caution in mind,
Fresh packages vetted, the best ones to find. 🎀

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Security Check ⚠️ Warning The npmMinimalAgeGate configuration is unsupported in Yarn 3.4.1 and breaks CI/CD; upgrade to Yarn 4.10.0+ or remove the configuration. Remove npmMinimalAgeGate from .yarnrc.yml or upgrade yarnPath to Yarn 4.10.0+ and update packageManager in package.json.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a 24-hour package manager cooldown via npmMinimalAgeGate configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/add-pm-cooldown

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a Yarn configuration intended to prevent installing very recently published npm packages by enforcing a 24-hour “cooldown” window.

Changes:

  • Add npmMinimalAgeGate: 1440 to .yarnrc.yml to gate installs of newly published packages.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

dependencies:
node-gyp: "^10.0.1"

npmMinimalAgeGate: 1440
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npmMinimalAgeGate does not appear to be a recognized Yarn configuration option for the pinned Yarn version (yarnPath: .yarn/releases/yarn-3.4.1.cjs). I couldn’t find the setting name in that Yarn release bundle, and Yarn 3.x typically fails with “Unrecognized configuration setting” for unknown keys, which would break installs/CI. Consider either upgrading Yarn to a version that supports this setting (and updating yarnPath accordingly) or using an alternative approach (e.g., registry proxy/mirroring) that’s compatible with Yarn 3.4.1.

Suggested change
npmMinimalAgeGate: 1440
# npmMinimalAgeGate: 1440 # Unsupported in Yarn 3.4.1

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.yarnrc.yml:
- Line 10: The .yarnrc.yml contains the unsupported key "npmMinimalAgeGate"
which breaks Yarn 3.4.1 CI; remove the "npmMinimalAgeGate: 1440" entry to
unblock CI immediately, or alternatively update the configured "yarnPath" to a
Yarn >= 4.10.0 release and then re-add "npmMinimalAgeGate" if needed; ensure
after the change that "yarn install" and "yarn config" succeed in CI.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 029061ca-3876-46d6-8a02-75ac0bf5bd59

📥 Commits

Reviewing files that changed from the base of the PR and between f314fa8 and d0b04a3.

📒 Files selected for processing (1)
  • .yarnrc.yml

dependencies:
node-gyp: "^10.0.1"

npmMinimalAgeGate: 1440
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

For Yarn Berry, is npmMinimalAgeGate supported in Yarn 3.4.1? If not, which exact Yarn version first supports it according to official Yarn documentation/changelog?

💡 Result:

No, npmMinimalAgeGate is not supported in Yarn 3.4.1. It was first supported in Yarn 4.10.0, as per the official GitHub pull request #6901 merged on 2025-09-18 where the maintainer stated "Released in 4.10", and confirmed in the 4.10.0 release changelog listing the feature.

Citations:


npmMinimalAgeGate is incompatible with Yarn 3.4.1 and is breaking CI.

This config key is not supported until Yarn 4.10.0. Line 10 introduces an unrecognized setting that causes yarn config and yarn install to hard-fail with Yarn 3.4.1 (Line 12).

Unblock immediately by removing this line, or upgrade yarnPath to Yarn 4.10.0 or later and re-add the key.

Minimal fix (remove unsupported key)
-npmMinimalAgeGate: 1440
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.yarnrc.yml at line 10, The .yarnrc.yml contains the unsupported key
"npmMinimalAgeGate" which breaks Yarn 3.4.1 CI; remove the "npmMinimalAgeGate:
1440" entry to unblock CI immediately, or alternatively update the configured
"yarnPath" to a Yarn >= 4.10.0 release and then re-add "npmMinimalAgeGate" if
needed; ensure after the change that "yarn install" and "yarn config" succeed in
CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants